//============================================================================
// Name        : test.cpp
// Author      : O.M.A.V.
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <stdio.h>
#include <unistd.h>
#include "vectornav.h"

/* Change the connection settings to your configuration. */
const char* const COM_PORT = "//dev//ttyUSB0";
const int BAUD_RATE = 57600;

int main()
{
	Vn100 vn100;
	VnYpr ypr;

	vn100_connect(&vn100, COM_PORT, BAUD_RATE);

	while(true){
		vn100_getYawPitchRoll(&vn100, &ypr);
		printf("YPR: %+#7.2f %+#7.2f %+#7.2f\n", ypr.yaw, ypr.pitch, ypr.roll);

	}

	vn100_disconnect(&vn100);

	return 0;
}
